/**
 * http://en.wikipedia.org/wiki/Linear_congruential_generator
 * 
 * Veja a relação de recorrência do link acima.
**/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <limits.h>

const unsigned int A = 1664525, C = 1013904223;

unsigned int next(unsigned int x)
{
        return x*A+C;
}

/*int main() {
    int i;
    double x = time(NULL);

    for(i=0; i<10; i++) {
        x = next(x);
        printf("%lf\n", x/UINT_MAX);
    }
    return 0;
}*/
